<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Insert title here</title>
<%!
public String getRemortIP(HttpServletRequest request) { 
if (request.getHeader("x-forwarded-for") == null) { 
return request.getRemoteAddr(); 
} 
return request.getHeader("x-forwarded-for"); 
}
%> 
<script type="text/javascript">
	var datainfo='{"S_Id":1,"DAQ_Address":1,"databody":[{"Value":10,"Desc":"AI3"},{"Value":20,"Desc":"AI2"}]}';
	var xmlHttp;	
		if(window.XMLHttpRequest){
			xmlHttp=new XMLHttpRequest();
		}else{
			xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
		}
	xmlHttp.open("get", "DatainfoSet?datainfo="+datainfo, true);
	xmlHttp.send();
</script>
</head>
<body>

<!-- {
	jsonStrs=
{
	\'id\':\'1\'
	'total'：'3'
	'databody'：
	[
		{
			'D_Datatype':'1'	
			'D_Value':'10'
			'D_Source':'1'					
		}
		{
			'D_Datatype':'1'	
			'D_Value':'20'
			'D_Source':'2'				
		}
		{
			'D_Datatype':'2'	
			'D_Value':'0'
			'D_Source':'3'				
		}
	]
}	

} -->


<%-- 接口版本1测试<form action="DatainfoSet" method="get">
<table>
	<tr>
		<th colspan="2">数据存储</th>
	</tr>
	<tr>
		<td>S_Id</td>
		<td><input type="text" id="S_Id" name="S_Id" value="${device_id}"/></td>
	</tr>
	<tr>
		<td>D_Datatype:</td>
		<td><input type="text" id="D_Datatype" name="D_Datatype" value="${D_Datatype}"/></td>
	</tr>
	<tr>
		<td>D_Value:</td>
		<td><input type="text" id="D_Value" name="D_Value" value="${D_Value}"/></td>
	</tr>
	<tr>
		<td>D_Source:</td>
		<td><input type="text" id="D_Source" name="D_Source" value="${D_Source}"/></td>
	</tr>
	<tr>
		<td><input type="submit" value="提交"/></td>
		<td><font color="red">${error }</font></td>
	</tr>
</table>
</form> --%>
<form name="adminloginForm" method="post" action="setAInfo02.jsp"> 
   <td align="center"><%=getRemortIP(request)%></td> 
   <input type="submit" name="Submit" value="确定"> 
</form>
</body>
</html>